<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>运行时配置</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="yaf.installation.html">« 安装</a></li>
      <li style="float: right;"><a href="yaf.resources.html">资源类型 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="yaf.setup.html">安装/配置</a></li>
    <li>运行时配置</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="yaf.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Yaf 配置选项</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.library" class="link">yaf.library</a></td>
      <td class="empty">&nbsp;</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.action-prefer" class="link">yaf.action_prefer</a></td>
      <td>0</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.lowcase-path" class="link">yaf.lowcase_path</a></td>
      <td>0</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.use-spl-autoload" class="link">yaf.use_spl_autoload</a></td>
      <td>0</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.forward-limit" class="link">yaf.forward_limit</a></td>
      <td>5</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.name-suffix" class="link">yaf.name_suffix</a></td>
      <td>1</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.name-separator" class="link">yaf.name_separator</a></td>
      <td class="empty">&nbsp;</td>
      <td>its PHP_INI_ALL value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.cache-config" class="link">yaf.cache_config</a></td>
      <td>0</td>
      <td>its PHP_INI_SYSTEM value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.environ" class="link">yaf.environ</a></td>
      <td>product</td>
      <td>its PHP_INI_SYSTEM value</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.html#ini.yaf.use-namespace" class="link">yaf.use_namespace</a></td>
      <td>0</td>
      <td>its PHP_INI_SYSTEM value</td>
      <td></td>
     </tr>

    </tbody>
   
  </table>

 </p>

 <p class="para">这是配置指令的简短说明。</p>

 <p class="para">
  <dl>
   
     <dt id="ini.yaf.library">
      <code class="parameter">yaf.library</code>
      <span class="type">string</span>
     </dt>

     <dd>

      <p class="para">
        The global library path, Yaf_loader will search global library in this
        directory.      
      </p>
     </dd>

    
    
     <dt id="ini.yaf.action-prefer">
      <code class="parameter">yaf.action_prefer</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
        If there is only one part in PATH_INFO, should it consider as a
        controller or action.
      </p>
      <p class="para">
        If this configure On, it will be considered as a Action name.
      </p>
     </dd>

    
    
     <dt id="ini.yaf.lowcase-path">
      <code class="parameter">yaf.lowcase_path</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
       Whether lowercase all the path during the class autoloading.
      </p>
     </dd>

    
    
     <dt id="ini.yaf.use-spl-autoload">
      <code class="parameter">yaf.use_spl_autoload</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
        When this value is On, if <span class="classname"><a href="class.yaf-loader.html" class="classname">Yaf_Loader</a></span> can not
        find a class, it will return FALSE, then give chance to other auto
        load function to be called.      
      </p>

      <p class="para">
        When this value is Off(default),
        <span class="methodname"><a href="yaf-loader.autoload.html" class="methodname">Yaf_Loader::autoload()</a></span> will always return TRUE.
      </p>
     </dd>

    
    
     <dt id="ini.yaf.forward-limit">
      <code class="parameter">yaf.forward_limit</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
        The max forward count,  default is 5. that means you can have a max
        value of 5 in the forward stack.
       </p>
      <p class="para">
       This is a protection for prevent recursive
       <span class="methodname"><a href="yaf-controller-abstract.forward.html" class="methodname">Yaf_Controller_Abstract::forward()</a></span>.
      </p>
     </dd>

    
    
     <dt id="ini.yaf.name-suffix">
      <code class="parameter">yaf.name_suffix</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
       When this On, Yaf_Loader will identify a class by it&#039;s suffix to decide
       whether it is a MVC Class.
      </p>
      <p class="para">
       When this Off, Yaf_Loader will look at the prefix of the class name.
      </p>
     </dd>

    
    
     <dt id="ini.yaf.name-separator">
      <code class="parameter">yaf.name_separator</code>
      <span class="type">string</span>
     </dt>

     <dd>

      <p class="para">
       When this is not empty, Yaf_Loader will identify the class suffix and
       string value of this.
      </p>
      <p class="para">
       For example, when this value is &quot;_&quot;, Yaf_Loader will take Index_Controller as
       a Controller Class, IndexController as a normal class.
      </p>
     </dd>

    
    
     <dt id="ini.yaf.cache-config">
      <code class="parameter">yaf.cache_config</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
        If this is On, and in the meantime you are using ini config file as the
        parameter of <span class="methodname"><strong>Yaf_Application()</strong></span>, the
        compiling result of the ini config file will be cached in the PHP
        process.
        <blockquote class="note"><p><strong class="note">注意</strong>: 
         <p class="para">
          Yaf examine the mtime of the ini file, if it was changed since
          last compiling, Yaf will reload it.
         </p>
        </p></blockquote>
        <div class="warning"><strong class="warning">警告</strong>
         <p class="para">
          Yaf use the ini file path as the cache entry key, so do use the
          absolute path in ini file path, otherwise there might be some
          conflicts if two application use the same relative path of ini
          config.
         </p>
        </div>
      </p>
     </dd>

    
    
     <dt id="ini.yaf.environ">
      <code class="parameter">yaf.environ</code>
      <span class="type">string</span>
     </dt>

     <dd>

      <p class="para">
        This value is &quot;product&quot; by default, used for Yaf to fetch the config
        section of a ini config file.
       </p>
       <p class="para">
        That is, if this value is &quot;product&quot;, Yaf will use the section named
        &quot;product&quot; in the ini config file(the first parameter of the
        <span class="classname"><a href="class.yaf-application.html" class="classname">Yaf_Application</a></span>) as the final config of the
        <span class="classname"><a href="class.yaf-application.html" class="classname">Yaf_Application</a></span>.
      </p>
     </dd>

    

    
     <dt id="ini.yaf.use-namespace">
      <code class="parameter">yaf.use_namespace</code>
      <span class="type">integer</span>
     </dt>

     <dd>

      <p class="para">
       Only works as of PHP 5.3, if this value is On, All class of Yaf will
       named in namespace style.
      </p>
      <p class="para">
       For example, Yaf_Route_Rewrite =&gt; \Yaf\Route\Rewrite,
       Yaf_Controller_Abstract =&gt; \Yaf\Controller_Abstract (Abstract is the
       keyword, can not used as a class name)
      </p>
     </dd>

    

  </dl>

 </p>
</div></div></div></body></html>